//
//  M1MsgHeader.m
//  NewMarryU
//
//  Created by apple on 2018/7/21.
//  Copyright © 2018年 Cedar. All rights reserved.
//

#import "M1MsgHeader.h"

@implementation M1MsgHeader
-(instancetype)init{
    self = [super init];
    if (self) {
        UIImageView *m1_head = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"ms_kefu"]];
        [self addSubview:m1_head];
        m1_head.userInteractionEnabled = YES;
        [m1_head mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.offset(20);
            make.centerY.equalTo(self);
            make.size.mas_offset(CGSizeMake(45, 45));
        }];
        
        UILabel *m1_LB = [[UILabel alloc]init];
        m1_LB.font = m1_boldFont(15);
        m1_LB.textColor = [UIColor blackColor];
        m1_LB.text = @"小红娘";
        [self addSubview:m1_LB];
        [m1_LB mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(m1_head.mas_right).offset(15);
            make.top.equalTo(m1_head.mas_top).offset(5);
        }];
        
        UIView *m1_line = [[UIView alloc]init];
        m1_line.backgroundColor = m1_line_color;
        [self addSubview:m1_line];
        [m1_line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.offset(20);
            make.bottom.right.offset(0);
            make.height.mas_offset(0.5);
        }];
        
        _clickBtn = [UIButton buttonWithType:UIButtonTypeSystem];
        [self addSubview:_clickBtn];
        [_clickBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.mas_offset(UIEdgeInsetsMake(0, 0, 0, 0));
        }];
    }
    return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
